﻿<%@ Page Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ProductoList.aspx.cs"
    Inherits="WebAppPlanProduccion.App.ProductoList" %>

<asp:Content ID="HeaderContent" ContentPlaceHolderID="HeadContent" runat="server">
    <link href="/Styles/GridStyle.css" rel="stylesheet" type="text/css" />
    <link href="/Styles/jquery-ui-1.8.10.custom.css" rel="stylesheet" type="text/css" />
    <script src="/Scripts/jquery-1.4.4.min.js" type="text/javascript"></script>
    <script src="/Scripts/jquery-ui-1.8.10.custom.min.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Buscar Productos
    </h2>
    <div class="editionContainerFilter searchBox">
        <p>
            <span class="title2">C&oacute;digo de Producto:</span>
            <asp:TextBox ID="txtProducto" runat="server" CssClass="inputs" ClientIDMode="Static"></asp:TextBox>
        </p>
        <p>
            <span class="title2 secondColumn">C&oacute;digo de Color:</span>
            <asp:TextBox ID="txtColor" runat="server" CssClass="inputs" ClientIDMode="Static"></asp:TextBox>
        </p>
        <div class="clear">
        </div>
        <p>
            <span class="title2">Calidad</span>
            <asp:DropDownList ID="cboCalidad" runat="server" CssClass="cbo">
            </asp:DropDownList>
        </p>
        <p>
            <span class="title2 secondColumn">Temporada:</span>
            <asp:DropDownList ID="cboTemporada" runat="server" CssClass="cbo">
            </asp:DropDownList>
        </p>
        <div class="clear">
        </div>
        <p>
            <asp:LinkButton ID="lnkBuscar" runat="server" OnClick="lnkBuscar_Click">Buscar</asp:LinkButton>
            <a href="#" onclick="javascript:document.forms[0].reset();">Limpiar</a>         
        </p>
        <div class="clear">
        </div>
    </div>
    <asp:Panel CssClass="editionContainerFilter fileBox" runat="server" ID="pnlImportar">
        <p style="padding-top: 8px; padding-bottom: 8px;">
            <span class="title">Archivo:</span>
            <asp:FileUpload ID="fileProductos" runat="server" />
        </p>
        <div class="clear">
        </div>
        <div class="buttons">
            <asp:LinkButton ID="lnkSave" runat="server" CssClass="agregarNuevo" OnClick="lnkImportar_Click"
                ToolTip="Importe productos mediante Excel">Importar</asp:LinkButton>
        </div>
        <div class="clear">
        </div>
    </asp:Panel>
    <div class="clear">
    </div>
    <asp:Panel ID="pnlAllResults" CssClass="editionContainerForGrid" runat="server" Visible="false">
        <h2>
            Listado de Productos
        </h2>
        <asp:Panel ID="pnlResults" CssClass="editionContainerForGrid" runat="server">
            <asp:GridView ID="GridProductos" runat="server" CellPadding="4" ForeColor="#333333"
                GridLines="None" AutoGenerateColumns="False" DataKeyNames="Id" Width="100%" AllowPaging="True"
                OnPageIndexChanging="GridProductos_PageIndexChanging" OnRowCommand="GridProductos_RowCommand"
                OnRowDataBound="GridProductos_RowDataBound">
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <%-- <asp:ButtonField ButtonType="Image" CommandName="editar" ImageUrl="~/Images/editar.png"
                    Text="Button" AccessibleHeaderText="editar">
                    <HeaderStyle HorizontalAlign="Left" Width="30px" />
                    <ItemStyle HorizontalAlign="Center" />
                </asp:ButtonField>      --%>
                    <asp:BoundField DataField="Id" HeaderText="Id" Visible="false">
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="ProductoIdExterno" HeaderText="Código de Producto">
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="ColorIdExterno" HeaderText="Código de Color">
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="CalidadId" HeaderText="Calidad">
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="ProductoNombre" HeaderText="Producto">
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="ColorNombreExterno" HeaderText="Color">
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="TemporadaNombre" HeaderText="Temporada">
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="MarcaNombreExterno" HeaderText="Marca">
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="OrigenNombreExterno" HeaderText="Origen">
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="LineaNombreExterno" HeaderText="Linea">
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="FamiliaNombreExterno" HeaderText="Familia">
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="SubFamiliaNombreExterno" HeaderText="SubFamilia">
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                </Columns>
                <EditRowStyle BackColor="#2461BF" />
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#4b6c9e" Font-Bold="True" ForeColor="White" HorizontalAlign="Left" />
                <PagerStyle BackColor="#4b6c9e" ForeColor="White" HorizontalAlign="Center" />
                <RowStyle BackColor="#EFF3FB" />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                <SortedAscendingCellStyle BackColor="#F5F7FB" />
                <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                <SortedDescendingCellStyle BackColor="#E9EBEF" />
                <SortedDescendingHeaderStyle BackColor="#4870BE" />
            </asp:GridView>
        </asp:Panel>
    </asp:Panel>
</asp:Content>
